﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class SendMessageBLL : BaseBLL<SendMessage>
    {
        public SendMessage entity = new SendMessage();
        SendMessageDAO dao = new SendMessageDAO();
        public override SendMessage GetModel()
        {
            return entity;
        }
        /// <summary>
        /// 模糊+状态查询用户的发件信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <param name="isDel"></param>
        /// <param name="isPub"></param>
        /// <param name="date1"></param>
        /// <param name="date2"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public IList<SendMessage> GetListPaging(int page, int pagesize, int userid, int state, bool isDel, bool isPub, DateTime date1, DateTime date2, string key)
        {
            return dao.GetListPaging(page, pagesize, userid, state, isDel, isPub, date1, date2, key);
        }
        /// <summary>
        /// 模糊+状态查询用户的发件信息条数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <param name="isDel"></param>
        /// <param name="isPub"></param>
        /// <param name="date1"></param>
        /// <param name="date2"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, int state, bool isDel, bool isPub, DateTime date1, DateTime date2, string key)
        {
            return dao.GetListPaging( userid, state, isDel, isPub, date1, date2, key);
        }


        /// <summary>
        /// 查询待处理信件
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<SendMessage> GetListPaging(int userid, bool isPub, bool isDel, int page, int pagesize)
        {
            return dao.GetListPaging(userid, isPub, isDel, page, pagesize);
        }

        /// <summary>
        /// 查询待完成信件数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, bool isPub, bool isDel)
        {
            return dao.GetListPaging(userid,isPub,isDel);
        }


        /// <summary>
        /// 查询删除信件
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<SendMessage> GetListPaging(int userid, bool isDel, int page, int pagesize)
        {
            return dao.GetListPaging(userid,isDel,page,pagesize);
        }

        /// <summary>
        /// 查询删除信件数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, bool isDel)
        {
            return dao.GetListPaging(userid, isDel);
        }



       /// <summary>
        /// 批量修改暂存
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchSendMessageUpdate(string ids)
        {
           return dao.BatchSendMessageUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchSendMessageDelete(string ids)
        {
            return dao.BatchSendMessageDelete(ids);
        }


        public Boolean BatchSSendMessageUpdate(string ids)
        {
           return dao.BatchSSendMessageUpdate(ids);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchSSendMessageDelete(string ids)
        {
            return dao.BatchSSendMessageDelete(ids);
        }
    }
}
